/**
 * Created by lobin on 2017/7/24.
 */
import { Application } from 'egg';
export default (app: Application) => {
  const mongoose = app.mongoose;
  const Schema = mongoose.Schema;
  const ObjectId = Schema.Types.ObjectId;
  const schema = new mongoose.Schema({
    site: { type: ObjectId },
    name: String,
    pinyin: String,
    params: Object,
    storeId: String,
    excom: ObjectId,
  });
  return mongoose.model('Connection', schema, 'connection');
};
